<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Javascript 变量</title>
</head>
<body>
<h2>类似代数</h2>
<p>JavaScript 变量是存储数据值的容器。</p>
<p id="demo"></p>

<script>
  var price1=7;
  var price2=8;
  var price3=9;
  var total=price1+price2+price3;
  document.getElementById("demo").innerHTML="总计："+total;
</script>

</body>
</html>